﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Share/Default.master" AutoEventWireup="true" CodeFile="ArticleList.aspx.cs" Inherits="Admin_Article_ArticleList" Title="无标题页" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="body" Runat="Server">
<table>
    <tr>
        <td><b>搜索:</b></td>
        <td>标题</td>
        <td>
            <asp:TextBox ID="title" runat="server"></asp:TextBox></td>
        <td>分类</td>
        <td>
            <asp:DropDownList ID="category" runat="server">
                    <asp:ListItem Value="1" Text="帮助"></asp:ListItem>
                </asp:DropDownList></td>   
        <td>作者</td>
        <td>
            <asp:TextBox ID="author" runat="server"></asp:TextBox></td>
        <td>
        <td>权重</td>
        <td>
            <asp:TextBox ID="weight" runat="server"></asp:TextBox></td>
        <td>
            <asp:Button ID="search" runat="server" Text="搜索" onclick="search_Click" />
        </td> 
    </tr>
</table>
<asp:GridView ID="gv" runat="server" AutoGenerateColumns="False" SkinID="gvList">
<Columns>
    <asp:TemplateField HeaderText="编辑">
        <ItemTemplate>
            <img src="/images/Edit.gif" title="编辑" />
            <a href="ArticleEdit.aspx?articleId=<%#Eval("articleId") %>">编辑</a>
        </ItemTemplate>
    </asp:TemplateField>
    <asp:TemplateField  HeaderText="删除">
        <ItemTemplate>
            <img src="/images/Delete.gif" title="删除" />
            <a onclick="return confirm('确定删除分类:<%#Eval("Title") %>')" href="?articleId=<%#Eval("ArticleId") %>">删除</a>
        </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="Title" HeaderText="文章标题" />
    <asp:TemplateField HeaderText="所属分类">
        <ItemTemplate>
            <asp:Label ID="Label1" runat="server" Text='<%# GetCategoryName(Eval("ArticleCategoryId")) %>'></asp:Label>
        </ItemTemplate>
    </asp:TemplateField>
    <asp:BoundField DataField="Author" HeaderText="作者" />
    <asp:BoundField DataField="Weight" HeaderText="权重" />
    <asp:BoundField DataField="UpdateTime" HeaderText="更新日期" />
     <asp:TemplateField HeaderText="附件管理">
        <ItemTemplate>
            <a href="FuJian.aspx?articleid=<%#Eval("articleid") %>">附件管理</a>
        </ItemTemplate>
    </asp:TemplateField>
</Columns>
</asp:GridView>
    <center>
    <webdiyer:AspNetPager ID="pager" runat="server" onpagechanging="pager_PageChanging">
    </webdiyer:AspNetPager>
    </center>
</asp:Content>

